package com.example.zhuyu.login.module.mvp.ui.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.widget.Button;

import com.example.zhuyu.basemvp.base.BaseActivity;
import com.example.zhuyu.basemvp.di.component.AppComponent;
import com.example.zhuyu.login.R;
import com.example.zhuyu.login.R2;
import com.example.zhuyu.login.module.di.component.DaggerLoginComponent;
import com.example.zhuyu.login.module.di.module.LoginModule;
import com.example.zhuyu.login.module.mvp.contract.LoginContract;
import com.example.zhuyu.login.module.mvp.presenter.LoginPresenter;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * @author zhuyu
 */
public class LoginActivity extends BaseActivity<LoginPresenter> implements LoginContract.View {

    @BindView(R2.id.btn_login)
    Button mBtnLogin;

    @Override
    public int initLayout(@Nullable Bundle savedInstanceState) {
        return R.layout.login_activity_login;
    }

    @Override
    public void init(@Nullable Bundle savedInstanceState) {

    }

    @Override
    public void onRequest() {

    }

    @Override
    public void setDaggerComponent(AppComponent appComponent) {

        DaggerLoginComponent
                .builder()
                .appComponent(appComponent)
                .loginModule(new LoginModule(this))
                .build()
                .inject(this);

    }

    @Override
    public void showSuccessData(String msg) {


    }

    @OnClick(R2.id.btn_login)
    public void onViewClicked() {
        mPresenter.requestNet();
    }
}
